<template>
  <el-dialog :title="tiptitle" :visible.sync="dialogshow" center :show-close="false" :close-on-click-modal="false">
    <div style="display:flex;justifyContent: center;margin-bottom: 30px;">
      <div style="font-size: 14px;font-weight: bold; color: #0A2045">拒绝原因：</div>
      <el-radio-group v-model="choType">
        <el-radio v-for="(item, index) of chogroup" :key="index" :label="item">{{ item }}</el-radio>
        <!-- <el-radio label="资质不符合">资质不符合</el-radio>
        <el-radio label="企业联系不上">企业联系不上</el-radio>
        <el-radio label="其他">其他</el-radio> -->
      </el-radio-group>
    </div>
    <div style="textAlign: center">
      <el-button type="primary" @click="handlePassClick">确 定</el-button>
      <el-button @click="handleCancelClick">取 消</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  props: {
    dialogshow: Boolean,
    tiptitle: {
      type: String,
      default: ''
    },
    chogroup: {
      type: Array,
      default: null
    }
  },
  data() {
    return {
      choType: ''
    }
  },
  methods: {
    handlePassClick() {
      if (this.choType === '') {
        this.$message({
          type: 'warning',
          message: '请选择原因'
        })
      } else {
        this.$emit('handlepass', this.choType)
      }
    },
    handleCancelClick() {
      this.$emit('handlecancel')
    }
  }
}
</script>

<style lang="scss" scoped>
  .el-button:focus, .el-button:hover {
    color: #0C66FF;
    border-color: #0C66FF;
    background-color: #fff;
  }
  .el-button--primary {
    color: #FFF;
    background-color: #0C66FF;
    border-color: #0C66FF;
  }
  .el-button--small {
    border-radius: 8px;
  }
  .el-button--primary:hover {
    color: #fff;
    background-color: #0951CC;
    border-color: #0951CC;
  }
</style>
